Conversation
There was a problem hiding this comment.
Pull request overview
Adds an MCP tool for updating ONTAP SVMs (rename/state/comment), plus supporting REST client logic, schema updates, integration coverage, and documentation examples.
Changes:
- Introduce
update_svmtool and server handler, including update payload construction. - Add REST client support to PATCH an SVM by resolving its UUID via name lookup.
- Extend SVM schemas/models (tool + ontap) and add an integration test + docs examples.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tool/tool.go | Adds SVMCreate and extends SVM parameters with new_name, state, comment for update semantics. |
| server/svm.go | Switches create to SVMCreate params and adds UpdateSVM handler + newUpdateSVM builder. |
| server/server.go | Registers the new update_svm tool with update annotations. |
| rest/svm.go | Implements UpdateSVM by GETting SVM UUID by name then PATCHing the resource. |
| ontap/ontap.go | Extends ontap.SVM with state and comment fields for PATCH payloads. |
| integration/test/svm_test.go | Adds integration coverage for create/rename/update/delete SVM flows. |
| docs/examples.md | Documents SVM provisioning examples including update with state+comment. |
| descriptions/descriptions.go | Adds tool description text for UpdateSVM. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
server/svm.go:72
- DeleteSVM still uses tool.SVM as its input type, but tool.SVM now includes update-only fields (new_name/state/comment). This means the delete_svm tool schema will advertise irrelevant parameters, which can confuse callers/LLM function-calling. Consider introducing a minimal parameter type for delete (e.g., SVMRef/SVMDelete with cluster_name + svm_name only) and updating DeleteSVM to use it, similar to how CreateSVM now uses SVMCreate.
func (a *App) DeleteSVM(ctx context.Context, _ *mcp.CallToolRequest, parameters tool.SVM) (*mcp.CallToolResult, any, error) {
if !a.locks.TryLock(parameters.Cluster) {
return errorResult(fmt.Errorf("another write operation is in progress on cluster %s, please try again", parameters.Cluster)), nil, nil
}
defer a.locks.Unlock(parameters.Cluster)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rahulguptajss
previously approved these changes
Apr 16, 2026
cgrinds
previously approved these changes
Apr 16, 2026
# Conflicts: # docs/examples.md
rahulguptajss
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.